@extends('layouts.master')
@section('title')
    订单——钢链网后台管理系统
@stop
@section('app_css')
    <link rel="stylesheet" href="/resource/css/bootstrap.min.css">
    <link rel="stylesheet" href="/resource/css/font-awesome.min.css">
    <link rel="stylesheet" href="/resource/css/animate.min.css">
    <link rel="stylesheet" href="/resource/css/custom.css">
    <link rel="stylesheet" href="/resource/css/green.css">
    <link rel="stylesheet" href="/resource/css/fileinput.min.css">
    @stop
@section('app_js')
    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="/resource/js/jquery.min.js"></script>
    <script src="/resource/js/bootstrap.min.js"></script>
    <script src="/resource/js/custom.js"></script>
    <!-- icheck -->
    <script src="/resource/js/icheck.min.js"></script>
    <!-- Datatables -->
    <script src="/resource/js/jquery.dataTables.js"></script>
    <script src="/resource/js/J_main.js"></script>
    <!-- 添加图片 -->
    <script src="/resource/js/fileinput.min.js"></script>
    <script src="/resource/js/fileinput_locale_zh.js"></script>
@stop
@section('content')
    <body class="nav-md">
    <div class="container body">
        <div class="main_container">
            @include('common.admin_menu')
                    <!-- top navigation -->
            @include('common.admin_nav')
                    <!-- /top navigation -->
            <!-- page content -->
            <div class="right_col" role="main">
                <div class="">
                    <div class="row cont">
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="x_panel">
                                <div class="x_title">
                                    <h2>流水 <small>收款记录明细</small></h2>
                                    <div class="clearfix"></div>
                                </div>
                            </div>
                        </div>
                        @foreach($info as $key =>$info1)
                        <div class="col-md-6 col-sm-12 col-xs-12">
                            <div class="x_panel">
                                <div class="x_title">
                                    <h2><small>收款记录{{$key+1}}</small></h2>
                                    <div class="clearfix"></div>
                                    <h4><small>支付流水号：{{$info1->pay_trade_num}}</small></h4>
                                    <div class="clearfix"></div>
                                </div>
                                <div class="x_content">
                                    <br />
                                    {{ Form::open(['url'=>'admin/order_details', 'files' => true, 'method' => 'post']) }}

                                    <div class="form-group">
                                        <label class="control-label col-md-2 col-sm-2 col-xs-12" for="">金额
                                        </label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <div class="form-control col-md-7 col-xs-12">
                                                    {{$info1->amount}}
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-2 col-sm-2 col-xs-12" for="">时间
                                        </label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <div class="form-control col-md-7 col-xs-12">
                                                {{$info1->created}}
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-2 col-sm-2 col-xs-12" for="">支付方式
                                        </label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <select name="pro" class="form-control col-md-7 col-xs-12" disabled >
                                                <option value="0" @if($info1->payment ==0) selected="selected" @endif>京东支付</option>
                                                <option value="1" @if($info1->payment ==1) selected="selected" @endif>现金支付</option>
                                                <option value="2" @if($info1->payment ==2) selected="selected" @endif>银行转账</option>
                                                <option value="3" @if($info1->payment ==3) selected="selected" @endif>银行承兑汇票</option>
                                            </select>
                                        </div>
                                    </div>
                                    @if($info1->payment == 2)
                                        <div class="form-group">
                                            <label class="control-label col-md-2 col-sm-2 col-xs-12" for="">银行账户
                                            </label>
                                            <div class="col-md-10 col-sm-10 col-xs-12">
                                                <div class="form-control col-md-7 col-xs-12">
                                                    {{$info1->account}}
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-2 col-sm-2 col-xs-12" for="">开户行
                                            </label>
                                            <div class="col-md-10 col-sm-10 col-xs-12">
                                                <div class="form-control col-md-7 col-xs-12">
                                                    {{$info1->bank_account}}
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-2 col-sm-2 col-xs-12" for="">开户人
                                            </label>
                                            <div class="col-md-10 col-sm-10 col-xs-12">
                                                <div class="form-control col-md-7 col-xs-12">
                                                    {{$info1->account_user}}
                                                </div>
                                            </div>
                                        </div>
                                    @endif
                                    <div class="form-group">
                                        <label class="control-label col-md-2 col-sm-2 col-xs-12" for="">备注
                                        </label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <textarea name="message" class="form-control col-md-7 col-xs-12" disabled>
                                                {{$info1->message}}
                                            </textarea>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-2 col-sm-2 col-xs-12" for="">附件
                                        </label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <div class="form-control col-md-7 col-xs-12">
                                                @if(!empty($info1->enclosure))
                                                    <img src="{{$info1->enclosure}}">
                                                                @endif
                                            </div>
                                        </div>
                                    </div>
                                    <!--  <div class="ln_solid"></div>
                                    <div class="form-group">
                                        <div class="col-md-10 col-sm-10 col-xs-12 col-md-offset-3">
                                            <button type="submit" class="btn btn-primary">取消</button>
                                            <button type="submit" class="btn btn-success">提交</button>
                                        </div>
                                    </div>-->
                                    {{ Form::close() }}
                                </div>
                            </div>
                        </div>
                        @endforeach
                        <div class="clearfix"></div>
                        <div class="col-md-3 col-sm-12 col-xs-12 pos-box">
                            <div class="x_panel">
                                <div class="x_content">
                                    <br />
                                    {{ Form::open(['url'=>'admin/order_details', 'files' => true, 'method' => 'post']) }}
                                    <div class="form-group">
                                        <label class="control-label col-md-4 col-sm-4 col-xs-12" for="">实收金额:
                                        </label>
                                        <div class="col-md-8 col-sm-8 col-xs-12">
                                            <div >￥{{number_format($amount_receivable)}}
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-4 col-sm-4 col-xs-12" for="">已收金额:
                                        </label>
                                        <div class="col-md-8 col-sm-8 col-xs-12">
                                            <div >￥{{number_format($received_amount)}}

                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-4 col-sm-4 col-xs-12" for="">欠款:
                                        </label>
                                        <div class="col-md-8 col-sm-8 col-xs-12">
                                            <div >￥{{number_format($arrears)}}

                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-12 col-sm-12 col-xs-12">
                                            <div >
                                                @if($arrears >0)
                                                温馨提示: 补齐所欠款额，才能发货哦！
                                                    @elseif($arrears == 0)
                                                    温馨提示: 已支付全部金额，请进行下一步操作！
                                                    @else
                                                @endif
                                            </div>
                                        </div>
                                    </div>
                                    {{ Form::close() }}
                                </div>
                            </div>
                        </div>

                        <br />
                        <br />
                        <br />
                    </div>
                </div>
                <!-- footer content -->
                <footer>
                    <div class="">
                        <p class="pull-right">Copyright 2016 ganglian.com All rights reserved. |
                            <span class="lead"> <i class="fa fa-logo-footer"></i> 钢链网后台管理系统</span>
                        </p>
                    </div>
                    <div class="clearfix"></div>
                </footer>
                <!-- /footer content -->
            </div>
            <!-- /page content -->
        </div>
    </div>
    <div id="custom_notifications" class="custom-notifications dsp_none">
        <ul class="list-unstyled notifications clearfix" data-tabbed_notifications="notif-group">
        </ul>
        <div class="clearfix"></div>
        <div id="notif-group" class="tabbed_notifications"></div>
    </div>
    </body>
@stop